﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="AddItem.aspx.cs" Inherits="Maintain_supplier_information.AddItem" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="MyScripts/jquery-2.0.3.min.js"></script>
    <script src="MyScripts/jquery.cookie.js"></script>
    <style type="text/css">
        .auto-style2
        {
            width: 209px;
        }
        .auto-style3
        {
            width: 199px;
        }
        .auto-style4
        {
            width: 209px;
            height: 29px;
        }
        .auto-style5
        {
            width: 199px;
            height: 29px;
        }
        .auto-style6
        {
            height: 29px;
        }
        .auto-style7 {
            width: 209px;
            height: 24px;
        }
        .auto-style8 {
            width: 199px;
            height: 24px;
        }
        .auto-style9 {
            height: 24px;
            width: 25px;
        }
        .auto-style10
        {
            width: 80px;
        }
        .auto-style11
        {
            width: 25px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div align="center">
    <h2>Add New Item</h2>
    <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="List" ForeColor="Red" ValidationGroup="AddGrp" />
        <table class="table-condensed">
            <tr>
                <td class="auto-style2">
                    <asp:Label ID="lbl_ItemCode" runat="server" Text="Item Code:"></asp:Label>
                </td>
                <td class="auto-style3">
                    <asp:TextBox ID="txt_ItemCode" runat="server" CssClass="form-control" Width="200px"></asp:TextBox>
                    </td>
                <td class="auto-style11">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txt_ItemCode" ErrorMessage="Item Code must be filled" ForeColor="Red" ToolTip="Item Code must be filled" ValidationGroup="AddGrp">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txt_ItemCode" ErrorMessage="Item Code can only contain maximum 4 characters" ForeColor="Red" ValidationExpression="^\w{1,4}$" ValidationGroup="AddGrp">*</asp:RegularExpressionValidator>
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="auto-style7">
                    <asp:Label ID="lbl_Catgory" runat="server" Text="Category:"></asp:Label>
                </td>
                <td class="auto-style8">
                    <asp:DropDownList ID="ddl_Category" runat="server" CssClass="form-control" Width="200px">
                    </asp:DropDownList>
                </td>
                <td class="auto-style9"></td>
                <td></td>
                <td></td>
            </tr>
            <tr>
                <td class="auto-style2">
                    <asp:Label ID="lbl_ItemName" runat="server" Text="Item Name:"></asp:Label>
                </td>
                <td class="auto-style3">
                    <asp:TextBox ID="txt_ItemName" runat="server" CssClass="form-control" Width="200px"></asp:TextBox></td>
                <td class="auto-style11">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txt_ItemName" ErrorMessage="Item Name must be filled" ForeColor="Red" ToolTip="Item Name must be filled" ValidationGroup="AddGrp">*</asp:RequiredFieldValidator>
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="auto-style2">
                    <asp:Label ID="lbl_ReorderLevel" runat="server" Text="Re-order Level:"></asp:Label>
                </td>
                <td class="auto-style3">
                    <asp:TextBox ID="txt_reorderlevel" runat="server" TextMode="Number" CssClass="form-control" Width="200px"></asp:TextBox>
                    </td>
                <td class="auto-style11">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txt_reorderlevel" ErrorMessage="Re-order level must be filled" ForeColor="Red" ToolTip="Re-order level must be filled" ValidationGroup="AddGrp">*</asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="RangeValidator2" runat="server" ControlToValidate="txt_reorderlevel" ErrorMessage="Re-order level must be at least 1" ForeColor="Red" MaximumValue="2147483647" MinimumValue="1" Type="Integer" ValidationGroup="AddGrp">*</asp:RangeValidator>
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="auto-style2">
                    <asp:Label ID="lbl_ReorderQty" runat="server" Text="Re-order Quantity:"></asp:Label>
                </td>
                <td class="auto-style3">
                    <asp:TextBox ID="txt_reorderqty" runat="server" TextMode="Number" CssClass="form-control" Width="200px"></asp:TextBox>
                    </td>
                <td class="auto-style11">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ErrorMessage="Re-order quantity must be filled" ControlToValidate="txt_reorderqty" ForeColor="Red" ValidationGroup="AddGrp">*</asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txt_reorderqty" ErrorMessage="Min re-order quantity is 30" ForeColor="Red" MaximumValue="2147483647" MinimumValue="30" ToolTip="Min value is 30" Type="Integer" ValidationGroup="AddGrp">*</asp:RangeValidator>
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="auto-style2">
                    <asp:Label ID="lbl_UOM" runat="server" Text="Unit of Measurement (UOM):"></asp:Label>
                </td>
                <td class="auto-style3">
                    <asp:TextBox ID="txt_UOM" runat="server" CssClass="form-control" Width="200px"></asp:TextBox>
                    </td>
                <td class="auto-style11">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txt_UOM" ErrorMessage="UOM must be filled" ForeColor="Red" ToolTip="UOM must be filled" ValidationGroup="AddGrp">*</asp:RequiredFieldValidator>
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="auto-style4">
                    <asp:Label ID="lbl_AvailQty" runat="server" Text="Available Quantity:"></asp:Label>
                </td>
                <td class="auto-style5">
                    <asp:TextBox ID="txt_availQty" runat="server" TextMode="Number" CssClass="form-control" Width="200px"></asp:TextBox>
                    </td>
                <td class="auto-style11">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txt_availQty" ErrorMessage="Available Quantity must be filled" ForeColor="Red" ToolTip="Available Quantity must be filled" ValidationGroup="AddGrp">*</asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="RangeValidator3" runat="server" ControlToValidate="txt_availQty" ErrorMessage="Available quantity must be at least 0" ForeColor="Red" MaximumValue="2147483647" MinimumValue="0" Type="Integer" ValidationGroup="AddGrp">*</asp:RangeValidator>
                </td>
                <td class="auto-style6"></td>
            </tr>
            <tr>
                <td class="auto-style2">
                    <asp:Label ID="lbl_BinNum" runat="server" Text="Bin No:"></asp:Label>
                </td>
                <td class="auto-style3">
                    <asp:TextBox ID="txt_BinNo" runat="server" CssClass="form-control" Width="200px"></asp:TextBox>
                    </td>
                <td class="auto-style11">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txt_BinNo" ErrorMessage="Bin No must be filled" ForeColor="Red" ToolTip="Bin No must be filled" ValidationGroup="AddGrp">*</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txt_BinNo" ErrorMessage="Bin No can only contain maximum 4 characters" ForeColor="Red" ValidationExpression="^\w{1,4}$" ValidationGroup="AddGrp">*</asp:RegularExpressionValidator>
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="auto-style2">
                    <asp:Label ID="lbl_Supplier1" runat="server" Text="Supplier 1:"></asp:Label>
                </td>
                <td class="auto-style3">
                    <asp:DropDownList ID="ddl_Supplier1" runat="server" CssClass="form-control" Width="200px">
                    </asp:DropDownList>
                </td>
                <td class="auto-style11">

                </td>
                <td class="auto-style10">
                    <asp:Label ID="lbl_price1" runat="server" Text="Price:"></asp:Label>
                    </td>
                <td>
                    <asp:TextBox ID="txt_price1" runat="server" CssClass="form-control" Width="100px"></asp:TextBox>
                    </td>
                <td>

                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txt_price1" ErrorMessage="Price for supplier 1 must be filled" ForeColor="Red" ToolTip="Price for supplier 1" ValidationGroup="AddGrp">*</asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="RangeValidator4" runat="server" ErrorMessage="Price must be at least 0.01 and not more than 2 decimal place" ControlToValidate="txt_price1" ForeColor="Red" MaximumValue="100000" MinimumValue="0.01" Type="Currency" ValidationGroup="AddGrp">*</asp:RangeValidator>
                </td>

            </tr>
            <tr>
                <td class="auto-style2">
                    <asp:Label ID="lbl_Suplier2" runat="server" Text="Supplier 2:"></asp:Label>
                </td>
                <td class="auto-style3">
                    <asp:DropDownList ID="ddl_Supplier2" runat="server" CssClass="form-control" Width="200px">
                    </asp:DropDownList>
                </td>
                <td class="auto-style11">

                </td>
                <td class="auto-style10">
                    <asp:Label ID="lbl_price2" runat="server" Text="Price:"></asp:Label>
                    </td>
                <td>
                    <asp:TextBox ID="txt_price2" runat="server" CssClass="form-control" Width="100px"></asp:TextBox>
                    </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txt_price2" ErrorMessage="Price for supplier 2 must be filled" ForeColor="Red" ToolTip="Price for supplier 2" ValidationGroup="AddGrp">*</asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="RangeValidator5" runat="server" ControlToValidate="txt_price2" ErrorMessage="Price must be at least 0.01 and not more than 2 decimal place" ForeColor="Red" MaximumValue="100000" MinimumValue="0.01" Type="Currency" ValidationGroup="AddGrp">*</asp:RangeValidator>
                </td>
            </tr>
            <tr>
                <td class="auto-style2">
                    <asp:Label ID="lbl_Supplier3" runat="server" Text="Supplier 3:"></asp:Label>
                </td>
                <td class="auto-style3">
                    <asp:DropDownList ID="ddl_supplier3" runat="server" CssClass="form-control" Width="200px">
                    </asp:DropDownList>
                </td>
                <td class="auto-style11">

                </td>
                <td class="auto-style10">
                    <asp:Label ID="lbl_price3" runat="server" Text="Price:"></asp:Label>
                    </td>
                <td>
                    <asp:TextBox ID="txt_price3" runat="server" CssClass="form-control" Width="100px"></asp:TextBox>
                    </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txt_price3" ErrorMessage="Price for supplier 3 must be filled" ForeColor="Red" ToolTip="Price for supplier 3" ValidationGroup="AddGrp">*</asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="RangeValidator6" runat="server" ControlToValidate="txt_price3" ErrorMessage="Price must be at least 0.01 and not more than 2 decimal place" ForeColor="Red" MaximumValue="100000" MinimumValue="0.01" Type="Currency" ValidationGroup="AddGrp">*</asp:RangeValidator>
                </td>
            </tr>
            <tr>
                <td colspan="4"><asp:Button ID="btn_Add" runat="server" OnClick="btn_Add_Click" Text="Add" CssClass="btn-primary" ValidationGroup="AddGrp" />&nbsp;
                     <asp:Button ID="btn_cancel" runat="server" Text="Cancel" OnClick="btn_cancel_Click" CausesValidation="False" CssClass="btn-success" />
                </td>
            </tr>
        </table>
    <br />

    </div>
        <br />
</asp:Content>
